<?xml version="1.0" encoding="UTF-8" ?>
<XMLDB PATH="mod/flashcard/db" VERSION="20080510" COMMENT="XMLDB file for Moodle mod/flashcard"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:noNamespaceSchemaLocation="../../../lib/xmldb/xmldb.xsd"
>
  <TABLES>
    <TABLE NAME="flashcard" COMMENT="flashcard table retrofitted from MySQL" NEXT="flashcard_card">
      <FIELDS>
        <FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="true" NEXT="course"/>
        <FIELD NAME="course" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" PREVIOUS="id" NEXT="name"/>
        <FIELD NAME="name" TYPE="char" LENGTH="255" NOTNULL="false" SEQUENCE="false" PREVIOUS="course" NEXT="intro"/>
        <FIELD NAME="intro" TYPE="text" LENGTH="small" NOTNULL="true" SEQUENCE="false" PREVIOUS="name" NEXT="introformat"/>
        <FIELD NAME="introformat" TYPE="int" LENGTH="4" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" PREVIOUS="intro" NEXT="timemodified"/>
        <FIELD NAME="timemodified" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" PREVIOUS="introformat" NEXT="starttime"/>
        <FIELD NAME="starttime" TYPE="int" LENGTH="11" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" COMMENT="availability starts" PREVIOUS="timemodified" NEXT="endtime"/>
        <FIELD NAME="endtime" TYPE="int" LENGTH="11" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" COMMENT="availability ends" PREVIOUS="starttime" NEXT="questionid"/>
        <FIELD NAME="questionid" TYPE="int" LENGTH="11" NOTNULL="true" UNSIGNED="false" DEFAULT="0" SEQUENCE="false" PREVIOUS="endtime" NEXT="autodowngrade"/>
        <FIELD NAME="autodowngrade" TYPE="int" LENGTH="1" NOTNULL="true" UNSIGNED="true" DEFAULT="1" SEQUENCE="false" COMMENT="if true downgrades automatically cards for lazy users on cron" PREVIOUS="questionid" NEXT="decks"/>
        <FIELD NAME="decks" TYPE="int" LENGTH="3" NOTNULL="true" UNSIGNED="true" DEFAULT="3" SEQUENCE="false" COMMENT="number of decks" PREVIOUS="autodowngrade" NEXT="deck2_release"/>
        <FIELD NAME="deck2_release" TYPE="int" LENGTH="11" NOTNULL="true" UNSIGNED="true" DEFAULT="96" SEQUENCE="false" COMMENT="time for unseen cards downgrade to deck1" PREVIOUS="decks" NEXT="deck3_release"/>
        <FIELD NAME="deck3_release" TYPE="int" LENGTH="11" NOTNULL="true" UNSIGNED="true" DEFAULT="96" SEQUENCE="false" COMMENT="time for getting the card be downgraded" PREVIOUS="deck2_release" NEXT="deck4_release"/>
        <FIELD NAME="deck4_release" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="96" SEQUENCE="false" COMMENT="Default comment for the field, please edit me" PREVIOUS="deck3_release" NEXT="deck1_delay"/>
        <FIELD NAME="deck1_delay" TYPE="int" LENGTH="11" NOTNULL="true" UNSIGNED="true" DEFAULT="48" SEQUENCE="false" COMMENT="triggers the need of checking cards" PREVIOUS="deck4_release" NEXT="deck2_delay"/>
        <FIELD NAME="deck2_delay" TYPE="int" LENGTH="11" NOTNULL="true" UNSIGNED="true" DEFAULT="96" SEQUENCE="false" COMMENT="Triggers the need of checking cards" PREVIOUS="deck1_delay" NEXT="deck3_delay"/>
        <FIELD NAME="deck3_delay" TYPE="int" LENGTH="11" NOTNULL="true" UNSIGNED="true" DEFAULT="168" SEQUENCE="false" COMMENT="Default comment for the field, please edit me" PREVIOUS="deck2_delay" NEXT="deck4_delay"/>
        <FIELD NAME="deck4_delay" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="376" SEQUENCE="false" COMMENT="Default comment for the field, please edit me" PREVIOUS="deck3_delay" NEXT="questionsmediatype"/>
        <FIELD NAME="questionsmediatype" TYPE="int" LENGTH="1" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" COMMENT="Default comment for the field, please edit me" PREVIOUS="deck4_delay" NEXT="answersmediatype"/>
        <FIELD NAME="answersmediatype" TYPE="int" LENGTH="1" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" COMMENT="Default comment for the field, please edit me" PREVIOUS="questionsmediatype" NEXT="audiostart"/>
        <FIELD NAME="audiostart" TYPE="int" LENGTH="1" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" COMMENT="Default comment for the field, please edit me" PREVIOUS="answersmediatype" NEXT="flipdeck"/>
        <FIELD NAME="flipdeck" TYPE="int" LENGTH="1" NOTNULL="false" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" COMMENT="Default comment for the field, please edit me" PREVIOUS="audiostart" NEXT="custombackfileid" />
        <FIELD NAME="custombackfileid" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" COMMENT="Default comment for the field, please edit me" PREVIOUS="flipdeck" NEXT="customfrontfileid" />
        <FIELD NAME="customfrontfileid" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" COMMENT="Default comment for the field, please edit me" PREVIOUS="custombackfileid" NEXT="customemptyfileid" />
        <FIELD NAME="customemptyfileid" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" COMMENT="Default comment for the field, please edit me" PREVIOUS="customfrontfileid" NEXT="customreviewfileid" />
        <FIELD NAME="customreviewfileid" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" COMMENT="Default comment for the field, please edit me" PREVIOUS="customemptyfileid" NEXT="customreviewedfileid" />
        <FIELD NAME="customreviewedfileid" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" COMMENT="Default comment for the field, please edit me" PREVIOUS="customreviewfileid" NEXT="customreviewemptyfileid" />
        <FIELD NAME="customreviewemptyfileid" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" COMMENT="Default comment for the field, please edit me" PREVIOUS="customreviewedfileid" NEXT="extracss" />
        <FIELD NAME="extracss" TYPE="text" LENGTH="small" NOTNULL="false" SEQUENCE="false" COMMENT="Additional css" PREVIOUS="customreviewemptyfileid" NEXT="completionallviewed" />
        <FIELD NAME="completionallviewed" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" COMMENT="Default comment for the field, please edit me" PREVIOUS="extracss" NEXT="completionallgood" />
        <FIELD NAME="completionallgood" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" COMMENT="Default comment for the field, please edit me" PREVIOUS="completionallviewed" NEXT="remindusers" />
        <FIELD NAME="remindusers" TYPE="int" LENGTH="1" NOTNULL="false" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" COMMENT="Default comment for the field, please edit me" PREVIOUS="completionallgood" />
      </FIELDS>
      <KEYS>
        <KEY NAME="primary" TYPE="primary" FIELDS="id" COMMENT="Primary key for flashcard"/>
      </KEYS>
    </TABLE>
    <TABLE NAME="flashcard_card" COMMENT="A table to distribute cards into decks" PREVIOUS="flashcard" NEXT="flashcard_deckdata">
      <FIELDS>
        <FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="true" COMMENT="id of the table, please edit me" NEXT="flashcardid"/>
        <FIELD NAME="flashcardid" TYPE="int" LENGTH="11" NOTNULL="true" UNSIGNED="true" SEQUENCE="false" COMMENT="the flashcard instance" PREVIOUS="id" NEXT="userid"/>
        <FIELD NAME="userid" TYPE="int" LENGTH="11" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" COMMENT="the owner" PREVIOUS="flashcardid" NEXT="entryid"/>
        <FIELD NAME="entryid" TYPE="int" LENGTH="11" NOTNULL="true" UNSIGNED="true" SEQUENCE="false" COMMENT="the question" PREVIOUS="userid" NEXT="deck"/>
        <FIELD NAME="deck" TYPE="int" LENGTH="11" NOTNULL="true" UNSIGNED="true" SEQUENCE="false" COMMENT="one of the decks in the flashcard" PREVIOUS="entryid" NEXT="lastaccessed"/>
        <FIELD NAME="lastaccessed" TYPE="int" LENGTH="11" NOTNULL="false" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" COMMENT="last time the card was queried" PREVIOUS="deck" NEXT="accesscount"/>
        <FIELD NAME="accesscount" TYPE="int" LENGTH="11" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" COMMENT="Default comment for the field, please edit me" PREVIOUS="lastaccessed"/>
      </FIELDS>
      <KEYS>
        <KEY NAME="primary" TYPE="primary" FIELDS="id" COMMENT="primary key of the table"/>
      </KEYS>
    </TABLE>
    <TABLE NAME="flashcard_deckdata" COMMENT="holds questions/responses" PREVIOUS="flashcard_card" NEXT="flashcard_userdeck_state">
      <FIELDS>
        <FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="true" COMMENT="id of the table, please edit me" NEXT="flashcardid"/>
        <FIELD NAME="flashcardid" TYPE="int" LENGTH="11" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" COMMENT="Default comment for the field, please edit me" PREVIOUS="id" NEXT="questiontext"/>
        <FIELD NAME="questiontext" TYPE="text" LENGTH="small" NOTNULL="false" SEQUENCE="false" COMMENT="Default comment for the field, please edit me" PREVIOUS="flashcardid" NEXT="answertext"/>
        <FIELD NAME="answertext" TYPE="text" LENGTH="small" NOTNULL="false" SEQUENCE="false" COMMENT="Default comment for the field, please edit me" PREVIOUS="questiontext"/>
      </FIELDS>
      <KEYS>
        <KEY NAME="primary" TYPE="primary" FIELDS="id" COMMENT="primary key of the table, please edit me"/>
      </KEYS>
    </TABLE>
    <TABLE NAME="flashcard_userdeck_state" COMMENT="holds deck state for each user" PREVIOUS="flashcard_deckdata">
      <FIELDS>
        <FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="true" COMMENT="primary key" NEXT="flashcardid"/>
        <FIELD NAME="flashcardid" TYPE="int" LENGTH="11" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" COMMENT="the flashcard" PREVIOUS="id" NEXT="userid"/>
        <FIELD NAME="userid" TYPE="int" LENGTH="11" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" COMMENT="User id" PREVIOUS="flashcardid" NEXT="deck"/>
        <FIELD NAME="deck" TYPE="int" LENGTH="4" NOTNULL="false" SEQUENCE="false" COMMENT="Deck index" PREVIOUS="userid" NEXT="state"/>
        <FIELD NAME="state" TYPE="int" LENGTH="4" NOTNULL="false" SEQUENCE="false" COMMENT="States if notified" PREVIOUS="deck"/>
      </FIELDS>
      <KEYS>
        <KEY NAME="primary" TYPE="primary" FIELDS="id" COMMENT="primary id"/>
      </KEYS>
    </TABLE>
  </TABLES>
</XMLDB>